import {
	mapState,
	mapGetters,
	mapMutations,
	mapActions
} from 'vuex';

module.exports = {
	computed: {
		// 将vuex的state中的所有变量，解构到全局混入的mixin中
		...mapState('user', ['userInfo', 'token', 'mobileInfo', 'setting', 'baseUrl']),
	},
	methods: {
		...mapMutations('user', ['setUserInfo', 'setToken', 'setMobileInfo', 'logOut']),
		...mapActions('user', ['getUserInfo', 'getSetting']),
	},
}